from langchain.prompts import (SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate)

template = "你是一名翻译专家，能够将{input_language}翻译成{output_language}."
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
human_template = "{text}"
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
resp = chat_prompt.format_messages(input_language="中文", output_language="英文", text="有志者事竟成")

print(resp)
